package com.hcss.core.common.permissions.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.hcss.core.util.DateUtil;

/**  
 *
 * @Prject: bs_oa
 * @Package: com.bsoa.core.mvc
 * @ClassName: UserInfo
 * @author: lvfang 
 * @date: 2014年4月9日 上午10:17:32
 * @version: V1.0  
 */
@Entity(name="t_userInfo")
public class UserInfo {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(nullable=false)
	private int id ;
	@Column(name="userNo",nullable=false,unique=true)
	private String userNo;
	
	@Column(name="userName",nullable=false)
	private String userName;
	
	@Column(name="userPwd",nullable=false)
	private String userPwd;
	
	@Column(name="userMail",nullable=false)
	private String userMail;
	
	@Column(name="userPhone",nullable=true)
	private String userPhone;
	
	@Column(name="userHeaderIcon",nullable=true)
	private String userHeaderIcon;
	
	@Column(name="userSex",nullable=true)
	private String userSex;
	
	@Column(name="userAge",nullable=true)
	private int userAge;
	
	@Column(name="lastLoginTime",nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastLoginTime;
	@Transient
	private String lastLoginTimeStr;
	
	@Column(name="userStatus",nullable=false)
	private String userStatus;
	
	@Column(name="regTime",nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date regTime;
	@Transient
	private String regTimeStr;
	
	@Column(name="userLevel",nullable=true)
	private String userLevel;
	
	@Column(name="isDeleted",nullable=true)
	private String isDeleted;
	
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the userNo
	 */
	public String getUserNo() {
		return userNo;
	}
	/**
	 * @param userNo the userNo to set
	 */
	public void setUserNo(String userNo) {
		this.userNo = userNo;
	}
	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * @return the userPwd
	 */
	public String getUserPwd() {
		return userPwd;
	}
	/**
	 * @param userPwd the userPwd to set
	 */
	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}
	/**
	 * @return the userMail
	 */
	public String getUserMail() {
		return userMail;
	}
	/**
	 * @param userMail the userMail to set
	 */
	public void setUserMail(String userMail) {
		this.userMail = userMail;
	}
	/**
	 * @return the userPhone
	 */
	public String getUserPhone() {
		return userPhone;
	}
	/**
	 * @param userPhone the userPhone to set
	 */
	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}
	/**
	 * @return the userHeaderIcon
	 */
	public String getUserHeaderIcon() {
		return userHeaderIcon;
	}
	/**
	 * @param userHeaderIcon the userHeaderIcon to set
	 */
	public void setUserHeaderIcon(String userHeaderIcon) {
		this.userHeaderIcon = userHeaderIcon;
	}
	/**
	 * @return the userSex
	 */
	public String getUserSex() {
		return userSex;
	}
	/**
	 * @param userSex the userSex to set
	 */
	public void setUserSex(String userSex) {
		this.userSex = userSex;
	}
	/**
	 * @return the userAge
	 */
	public int getUserAge() {
		return userAge;
	}
	/**
	 * @param userAge the userAge to set
	 */
	public void setUserAge(int userAge) {
		this.userAge = userAge;
	}
	/**
	 * @return the lastLoginTime
	 */
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	/**
	 * @param lastLoginTime the lastLoginTime to set
	 */
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	/**
	 * @return the userStatus
	 */
	public String getUserStatus() {
		return userStatus;
	}
	/**
	 * @param userStatus the userStatus to set
	 */
	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}
	/**
	 * @return the regTime
	 */
	public Date getRegTime() {
		return regTime;
	}
	/**
	 * @param regTime the regTime to set
	 */
	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}
	/**
	 * @return the userLevel
	 */
	public String getUserLevel() {
		return userLevel;
	}
	/**
	 * @param userLevel the userLevel to set
	 */
	public void setUserLevel(String userLevel) {
		this.userLevel = userLevel;
	}
	/**
	 * @return the isDeleted
	 */
	public String getIsDeleted() {
		return isDeleted;
	}
	/**
	 * @param isDeleted the isDeleted to set
	 */
	public void setIsDeleted(String isDeleted) {
		this.isDeleted = isDeleted;
	}
	/**
	 * @return the lastLoginTimeStr
	 */
	public String getLastLoginTimeStr() {
		lastLoginTimeStr = DateUtil.dateToString(this.getLastLoginTime(), DateUtil.FORMAT_ONE);
		return lastLoginTimeStr;
	}
	/**
	 * @param lastLoginTimeStr the lastLoginTimeStr to set
	 */
	public void setLastLoginTimeStr(String lastLoginTimeStr) {
		this.lastLoginTimeStr = lastLoginTimeStr;
	}
	/**
	 * @return the regTimeStr
	 */
	public String getRegTimeStr() {
		regTimeStr = DateUtil.dateToString(this.getRegTime(), DateUtil.FORMAT_ONE);
		return regTimeStr;
	}
	/**
	 * @param regTimeStr the regTimeStr to set
	 */
	public void setRegTimeStr(String regTimeStr) {
		this.regTimeStr = regTimeStr;
	}
	
	
}
